<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>闲渔放心淘</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<link rel="stylesheet" type="text/css" href="../css/login/main.css">
<link rel="stylesheet" href="../fonts/login/zhanghaomima/iconfont.css">
<style>
.lg-ad img{
	position:relative;
	left:50px;
}
.login-box-msg{
color:red;
}
</style>
</head>

<body id="login">

	<div id="content">
		<div class="lg-ad">
			<img src="../images/login/xianyulogin.png">

		</div>
		<div id="login-box">
			<div class="way lg-account">
				<div class="lg-tip">
					<h4>密码登录</h4>
					
					<p>
						<!-- <i class="iconfont sd-icon">&#xe64e;</i> -->
						扫码登录更方便 <b class="triangle outer"></b> <span
							class="triangle inner"></span>
					</p>
					
					<i class="iconfont icon-ico"></i>
				</div>
				<p class="login-box-msg"></p>
				<form id="account-form" method="post">
				
					<div>
						<label for="username"><i class="iconfont icon-yonghu"></i></label>
						<input type="text" name="username" id="username" placeholder="用户名">
						<i id="clear-icon" class="iconfont">&#xe65b;</i>
					</div>
					<div>
						<label for="password"><i class="iconfont icon-mima"></i></label> <input
							type="password" name="password" id="password" placeholder="密码">
					</div>
					<input type="button" id="lg-btn" name="submit" value="登 录">
					<!-- <input type="hidden" name="submitted" value="true"> -->
				</form>

				<div class="col-xs-8">
					<div class="checkbox icheck">
						<label> <input type="checkbox" id="rememberId">
							记住我
						</label>
					</div>
				</div>

				<p class="lg-links">
					<a href="index">首页</a> <a href="forgot_pass.html">忘记密码</a> <a
						href="register">免费注册</a>

				</p>
				<p id="lg-error">
					<i class="iconfont error-icon">&#xe65b;</i> <span></span>
				</p>
			</div>

			<div class="way lg-qrcode">
				<div class="lg-tip">
					<h4>扫码登录，防止盗号</h4>
					<i class="iconfont way-icon">&#xe64b;</i>
				</div>
				<div class="qrcode-err">
					<p>二维码已失效</p>
					<a id="fresh" href="#">请点击刷新</a>
				</div>
				<div class="qrcode-main">
					<img id="qrcode" src="img/login-ewm.png" alt="二维码">
					<div class="qrcode-help">
						<img src="img/login-help.png" alt="帮助">
					</div>
				</div>
				<div class="qrcode-desc clear">
					<i class="iconfont">&#xe650;</i>
					<p>
						打开 <a href="#">手机闲渔</a><br> 扫一扫登录
					</p>
				</div>
				<p class="lg-links">
					<a id="tab-way" href="#">账号密码登录</a> <a href="pages/reister.html">免费注册</a>
				</p>
			</div>
		</div>
	</div>
	<div id="footer">
		<div class="tmall-copyright">
			<div class="cr-container">
				<p class="footer-tmallinfo">
					<a href="#">关于闲渔</a> <a href="#">帮助中心</a> <a href="#">开放平台</a> <a
						href="#">诚聘英才</a> <a href="#">联系我们</a> <a href="#">网站合作</a> <a
						href="#">法律声明</a> <a href="#">知识产权</a> <a href="#">廉正举报</a> <a
						href="#">规则意见征集</a>
				</p>
				<p class="footer-otherlinks">
					<a href="#">闲渔集团</a> <a href="#">闲渔网</a> <a href="#">闲渔</a> <a
						href="#">1688</a> <a href="#">闲渔计算</a> <a href="#">闲渔通信</a>
				</p>
				<div class="footer-copyright">
					<span>增值电信业务经营许可证：<a href="#">浙B2-201104461</a></span> <span>网络文化经营许可证：<a
						href="#">浙网文[2015]0295-065号</a></span> <span>互联网医疗保健信息服务 审核同意书
						浙卫网审【2014】6号</span><br> <span>互联网药品信息服务资质证书编号：浙-（经营性）-2012-0005</span>
					<b>@2003-2016TMALL.COM版权所有</b>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="js/common/jquery-3.5.1.min.js"></script>

	<script type="text/javascript" >
  $(function () {
	  console.log("触发")
    $("#lg-btn").click(doLogin);
  });
  function doLogin(){
  console.log("触发")
   var params={
   username:$("#username").val(),
   password:$("#password").val(),
   isRememberMe:$("#rememberId").prop("checked")
   }
   //需要提交的地址
   var url="user/doLogin";
   console.log("params",params);
   $.post(url,params,function(result){
    console.log("login.result",result);
    if(result.state==1){
     console.log("成功");
   //跳转主页页面
   location.href="index";
    }else{
     //提示校验
   $(".login-box-msg").html(result.message); 
    }
    return false;//防止刷新时重复提交
   });
  }
</script>

</body>
</html>